package ExamLab.Test2;

public class VideoTape{

    class Recorder{
         public VideoTape getDisk(){
              return new VideoTape();
         }
         public String toString(){
              return "Recorder";
         }
    }

    class Player extends Recorder{
         public VHS getDisk(){
              return new VHS();
         }
         public String toString(){
              return "Player";
         }
    }

    public String toString(){
         return "AnyVideo";
    }

    public static void main(String args[]){
         VideoTape vt=new VHS();
         vt.new Recorder().getDisk();
         System.out.print(vt+" "+new VideoTape().new Player().getDisk());
    }

}

class VHS extends VideoTape{
    public String toString(){
         return "VHS_Mode";
    }
}